<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="utf-8" %>
<!doctype html>
<html lang="zh">
<head>
    <title>业务表单</title>
    <%@include file="/common/header.jspf"%>
    <style type="text/css">
        .observe{width: 900px;}
        .watch,.observation,.examine{width: 883px;margin: 10px auto;clear: both}
        .watch h3,.observation h3,.examine h3{font-size: 18px;color: #0565b9;text-align: center;font-weight: normal;}
        .watch-table{width: 881px;margin-top: 10px;border: 1px solid #BFBFBF}
        .watch-table tr td{padding: 8px 5px;font-size: 12px;color: #090909;border-bottom: 1px solid #BFBFBF;border-right: 1px solid #BFBFBF}
        .watch-table tr td span{color: #f70a0a;font-size: 14px;}
        .watch-td{text-align: center;background: #bbe6f7}
        .watch-table tr .watch-tdA{border-right: none}
        .watch-table .watch-tr td{border-bottom: none}
        .observation p{font-size: 12px;color: #3b3b3c;margin-top: 5px;}
        .reaction{width: 218px;border: 1px solid #C9C9C9;margin-top: 10px;float: left}
        .reaction li{padding: 3px 0;color: #363637}
        .reaction .reaction-first{padding: 8px 0;background: #bbe6f7;font-size: 14px;color: #0a0a0a}
        .reaction .option{width: 16px;height: 16px;margin-left: 5px;margin-right: 5px;}
        .careful{width: 875px;border:1px solid #C9C9C9;border-top: none;clear: both;}
        .careful p{padding: 5px 0 5px 5px;}

        .wins>span{
            width: 90%!important;
        }
        .winss>span{
            width: 100%!important;
            border: none;
        }
    </style>
</head>
<body>
<div class="observe">
    <form id="cardForm" method="post">
<c:choose>
        <c:when test="${auth=='yes'}">
    <div class="watch">
        <h3>HSE观察卡</h3>
        <input type="hidden" name="id" value="${card.id}"  />
        <table cellspacing="0" cellpadding="0" class="watch-table">
            <tr>
                <td class="watch-td">被观察作业活动<span>*</span></td>
                <td><input name="obsName" class="easyui-textbox formInput" value="${card.obsName}" data-options="required:true"/></td>
                <td class="watch-td">日期<span>*</span></td>
                <td><input id="obsFoundDate" class="easyui-datebox formInput"  name="obsFoundDate" data-options="editable:false" value="${card.obsFoundDate}"/></td>
                <td class="watch-td">区域/设施<span>*</span></td>
                <td><input class="easyui-textbox formInput"  name="obsPlace" data-options="required:true" value="${card.obsPlace}"/></td>
                <td class="watch-td">是否检查承包商<span>*</span></td>
                <td class="watch-tdA">
                    <select id="isConstrctor" class="easyui-combobox" name="isConstrctor" style="width:100%" data-options="required:true,editable:false,selectOnNavigation:true">
                        <option value="1" <c:if test="${card.isConstrctor==1}">selected="selected"</c:if>>是</option>
                        <option value="0" <c:if test="${card.isConstrctor==0}">selected="selected"</c:if>>否</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td class="watch-td">
                    <div class="unit" <c:if test="${card.isConstrctor==1}">style="display: none"</c:if>>被观察单位</div>
                    <div class="contractor" <c:if test="${card.isConstrctor==0}">style="display: none"</c:if>>所属承包商</div>
                    <span>*</span>
                </td>
                <td colspan="3" class="wins">
                    <div class="unit" <c:if test="${card.isConstrctor==0}">style='width: 100%;'</c:if> <c:if test="${card.isConstrctor==1}">style='width: 36%;display: none'</c:if>>
                        <input id="obsDeptId" class="easyui-textbox formInput parentDepartmentId" name="obsDeptId1" <c:if test="${card.isConstrctor==0}"> value="${card.obsDeptId}" </c:if> style="width: 90%"/>
                    </div>
                    <input id="contractor" name="obsDeptId2" <c:if test="${card.isConstrctor==1}"> value="${card.obsDeptId}" </c:if>  hidden/>
                    <div class="contractor" <c:if test="${card.isConstrctor==1}">style='width: 100%;'</c:if> <c:if test="${card.isConstrctor==0}">style='width: 36%;display: none'</c:if>>
                        <input id="contractorName" class="text formInput" name="contractorName" <c:if test="${card.isConstrctor==1}"> value="${card.obsDeptName}" </c:if> style="width: 90%"/>
                    </div>
                </td>
                <td colspan="2" class="watch-td">是否本班组/部门责任区域</td>
                <td colspan="2" class="watch-tdA">
                    <input type="radio" name="obsIsDuty" value="1" <c:if test="${card.obsIsDuty==1}">checked</c:if> style="width: 30%;text-align: right">是</input>
                    <input type="radio" name="obsIsDuty" value="0" <c:if test="${card.obsIsDuty==0}">checked</c:if> style="width: 30%;text-align: right">否</input>
                </td>
            </tr>
            <tr>
                <td class="watch-td">观察类型<span>*</span></td>
                <td colspan="7" class="watch-tdA">
                    <input type="radio" name="obsType" value="0" <c:if test="${card.obsType==0}">checked</c:if> style="width: 20%;text-align: right">不安全行为</input>
                    <input type="radio" name="obsType" value="1" <c:if test="${card.obsType==1}">checked</c:if> style="width: 20%;text-align: right">不安全状态</input>
                    <input type="radio" name="obsType" value="2" <c:if test="${card.obsType==2}">checked</c:if> style="width: 20%;text-align: right">推荐的安全行为</input>
                </td>
            </tr>
            <tr>
                <td class="watch-td">情况描述</td>
                <td colspan="7" class="watch-tdA wins">
                    <input class="easyui-textbox formInput"  name="obsDescribe" value="${card.obsDescribe}"/>
                </td>
            </tr>
            <tr>
                <td class="watch-td">措施及建议</td>
                <td colspan="7" class="watch-tdA wins">
                    <input class="easyui-textbox formInput"  name="obsAdvice" value="${card.obsAdvice}"/>
                </td>
            </tr>
            <tr>
                <td class="watch-td">被观察人数<span>*</span></td>
                <td><input class="easyui-numberbox formInput"  name="obsNum"  value="${card.obsNum}" data-options="required:true"/></td>
                <td class="watch-td">不安全行为人数<span>*</span></td>
                <td><input class="easyui-numberbox formInput"  name="obsUnSafeNum" value="${card.obsUnSafeNum}" data-options="required:true"/></td>
                <td class="watch-td">不安全问题数<span>*</span></td>
                <td colspan="3" class="watch-tdA wins">
                    <input class="easyui-numberbox formInput"  name="obsProblemNum" value="${card.obsProblemNum}" data-options="required:true"/>
                </td>
            </tr>
            <tr class="watch-tr">
                <td class="watch-td">分析人<span>*</span></td>
                <td>
                    <input id="analysis"  name="analysisUser" value="${card.analysisUser}" hidden/>
                    <input id="analysisTree" class="textbox formInput"  name="analysisUserName" value="${card.obsAnalysisName}" style="height: 30px"/>
                </td>
                <td class="watch-td">报告人<span>*</span></td>
                <td>
                    <input id="obsReporter" name="obsReporter" value="${card.obsReporter}" hidden/>
                    <input id="obsRep" class="textbox formInput"  name="obsReporterName" value="${card.obsReporterName}"style="height: 30px"/>
                </td>
                <td class="watch-td">单位/部门<span>*</span></td>
                <td colspan="3" class="watch-tdA wins">
                    <input class="easyui-textbox formInput parentDepartmentId"  name="obsReporterDept" value="${card.obsReporterDept}"/>
                </td>
            </tr>
        </table>
    </div>
    <div class="observation">
        <h3>HSE观察提示</h3>
        <p>实施HSE观察时，可从下面几个方面展开，并将观察情况填入观察卡的正面</p>
        <c:forEach var="lis" items="${list}">
            <div class="reaction">
                <ul>
                    <li class="reaction-first"><input type="checkbox" class="option"
                            <c:if test="${lis[0].dictionaryType.name=='人员的反应'}"> name="peopleReaction" <c:if test="${card.peopleReaction==1}">  checked="checked" </c:if> </c:if>
                            <c:if test="${lis[0].dictionaryType.name=='个人防护装备'}"> name="peopleProtect" <c:if test="${card.peopleProtect==1}">  checked="checked" </c:if></c:if>
                            <c:if test="${lis[0].dictionaryType.name=='人员位置'}"> name="peoplePlace" <c:if test="${card.peoplePlace==1}">  checked="checked" </c:if></c:if>
                            <c:if test="${lis[0].dictionaryType.name=='工具及设备'}"> name="tool" <c:if test="${card.tool==1}">  checked="checked" </c:if></c:if>
                                                      value="1"/>${lis[0].dictionaryType.name}</li>
                    <c:forEach var="li" items="${lis}">
                        <li><input type="checkbox" class="option" name="dictionaryId" value="${li.id}" <c:forEach var="opinionCreate" items="${opinionCreateList}"> <c:if test="${opinionCreate.opinionId==li.id}"> checked="checked" </c:if></c:forEach>/>${li.name}</li>
                    </c:forEach>
                </ul>
            </div>
        </c:forEach>
        <div class="careful">
            <p>注：完全安全的，在标项”口“打√，有任何不安全的，在相应内容项”口“打√</p>
        </div>
    </div>
        </c:when>
    <c:otherwise>
        <div class="watch">
            <h3>HSE观察卡</h3>
            <input type="hidden" name="id" value="${card.id}"  />
            <table cellspacing="0" cellpadding="0" class="watch-table">
                <tr>
                    <td class="watch-td">被观察作业活动<span>*</span></td>
                    <td>${card.obsName}</td>
                    <td class="watch-td">日期<span>*</span></td>
                    <td>${card.obsFoundDate}</td>
                    <td class="watch-td">区域/设施<span>*</span></td>
                    <td>${card.obsPlace}</td>
                    <td class="watch-td">是否检查承包商<span>*</span></td>
                    <td class="watch-tdA">
                            <c:if test="${card.isConstrctor==1}">是</c:if>
                            <c:if test="${card.isConstrctor==0}">否</c:if>
                    </td>
                </tr>
                <tr>
                    <td class="watch-td">
                        <c:if test="${card.isConstrctor==1}">所属承包商</c:if>
                        <c:if test="${card.isConstrctor==0}">被观察单位</c:if>
                        <span>*</span></td>
                    <td colspan="3" class="wins">${card.obsDeptName}</td>
                    <td colspan="2" class="watch-td">是否本班组/部门责任区域</td>
                    <td colspan="2" class="watch-tdA">
                        <c:if test="${card.obsIsDuty==1}">是</c:if>
                        <c:if test="${card.obsIsDuty==0}">否</c:if>
                    </td>
                </tr>
                <tr>
                    <td class="watch-td">观察类型<span>*</span></td>
                    <td colspan="7" class="watch-tdA">
                        <c:if test="${card.obsType==0}">不安全行为</c:if>
                        <c:if test="${card.obsType==1}">不安全状态</c:if>
                        <c:if test="${card.obsType==2}">推荐的安全行为</c:if>
                    </td>
                </tr>
                <tr>
                    <td class="watch-td">情况描述</td>
                    <td colspan="7" class="watch-tdA wins">
                        ${card.obsDescribe}
                    </td>
                </tr>
                <tr>
                    <td class="watch-td">措施及建议</td>
                    <td colspan="7" class="watch-tdA wins">
                        ${card.obsAdvice}
                    </td>
                </tr>
                <tr>
                    <td class="watch-td">被观察人数<span>*</span></td>
                    <td>${card.obsNum}</td>
                    <td class="watch-td">不安全行为人数<span>*</span></td>
                    <td>${card.obsUnSafeNum}</td>
                    <td class="watch-td">不安全问题数<span>*</span></td>
                    <td colspan="3" class="watch-tdA wins">
                        ${card.obsProblemNum}
                    </td>
                </tr>
                <tr class="watch-tr">
                    <td class="watch-td">分析人<span>*</span></td>
                    <td>${card.obsAnalysisName}</td>
                    <td class="watch-td">报告人<span>*</span></td>
                    <td>${card.obsReporterName}</td>
                    <td class="watch-td">单位/部门<span>*</span></td>
                    <td colspan="3" class="watch-tdA wins">
                        ${card.obsReporterDeptName}
                    </td>
                </tr>
            </table>
        </div>
        <div class="observation">
            <h3>HSE观察提示</h3>
            <p>实施HSE观察时，可从下面几个方面展开，并将观察情况填入观察卡的正面</p>
            <c:forEach var="lis" items="${list}">
                <div class="reaction">
                    <ul>
                        <li class="reaction-first"><input type="checkbox" class="option"
                                <c:if test="${lis[0].dictionaryType.name=='人员的反应'}"> name="peopleReaction" <c:if test="${card.peopleReaction==1}">  checked="checked" </c:if> </c:if>
                                <c:if test="${lis[0].dictionaryType.name=='个人防护装备'}"> name="peopleProtect" <c:if test="${card.peopleProtect==1}">  checked="checked" </c:if></c:if>
                                <c:if test="${lis[0].dictionaryType.name=='人员位置'}"> name="peoplePlace" <c:if test="${card.peoplePlace==1}">  checked="checked" </c:if></c:if>
                                <c:if test="${lis[0].dictionaryType.name=='工具及设备'}"> name="tool" <c:if test="${card.tool==1}">  checked="checked" </c:if></c:if>
                                                          value="1" disabled="disabled"/>${lis[0].dictionaryType.name}</li>
                        <c:forEach var="li" items="${lis}">
                            <li><input type="checkbox" class="option" name="dictionaryId" value="${li.id}" disabled="disabled" <c:forEach var="opinionCreate" items="${opinionCreateList}"> <c:if test="${opinionCreate.opinionId==li.id}"> checked="checked" </c:if></c:forEach>/>${li.name}</li>
                        </c:forEach>
                    </ul>
                </div>
            </c:forEach>
            <div class="careful">
                <p>注：完全安全的，在标项”口“打√，有任何不安全的，在相应内容项”口“打√</p>
            </div>
        </div>
    </c:otherwise>
</c:choose>
    </form>
    <div class="careful">
    </div>
<c:if test="${auth=='yes'}">
    <div style="text-align:center;padding:5px;">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="fa fa-save fa-lg" id="cardSave" >保存</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="fa fa-save fa-lg" id="cardSubmit" >提交</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="fa fa-remove fa-lg" id="cardReset">清空</a>
    </div>
</c:if>
</div>
<script type="text/javascript" src="${ctx}/resources/js/observation/observationCard/edit.js"></script>
</body>
</html>

